import request from "@/utils/request";

const BASE_URL = "/admin-api/supervisor";

class SupervisorAPI {
  static getSupervisorList(queryParams: any) {
    return request<any, any>({
      url: `${BASE_URL}/getSupervisorList`,
      method: "get",
      params: queryParams,
    });
  }

  static updateSupervisor(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/update`,
      method: "put",
      data,
    });
  }

  static deleteSupervisor(id: number) {
    return request<any, any>({
      url: `${BASE_URL}/delete/${id}`,
      method: "delete",
    });
  }

  static addSupervisor(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/add`,
      method: "post",
      data,
    });
  }
}

export default SupervisorAPI;
